
package com.hlkj.pay.service.payment;
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

import com.hlkj.framework.common.pojo.PageResult;
import com.hlkj.pay.dto.merchant.MerchantPaymentPageStatisticsDto;
import com.hlkj.pay.dto.payment.*;
import com.hlkj.pay.enums.MerchantEnum;
import com.hlkj.pay.infrastructure.model.payment.MerchantPaymentDO;
import com.hlkj.pay.infrastructure.model.payment.MerchantPaymentDetailDO;

import java.util.List;

/**
 * @author HlpayTeam
 * @date 2024/11/20 13:44
 */
public interface IMerchantPaymentService {

    /**
     * 
     * @param merchantPaymentPageQueryDto
     * @return
     */
    PageResult<MerchantPaymentPageDto> queryPage(MerchantPaymentPageQueryDto merchantPaymentPageQueryDto);
    /**
     *
     * @param merchantPaymentReq
     * @return
     */
    PageResult<MerchantPaymentDetailDto> queryDetailPage(MerchantPaymentPageQueryDto merchantPaymentReq);
    MerchantPaymentPageStatisticsDto merchantPaymentStatistics(MerchantPaymentPageQueryDto merchantPaymentReq);

    /**
     *
     * @param paymentId
     * @return
     */
    List<MerchantPaymentDetailDto> queryList(MerchantPaymentPageQueryDto merchantPaymentReq);

    /**
     * 
     * @param paymentId
     * @return
     */
    List<MerchantPaymentDetailDO> queryDetailList(String paymentId, Integer status);

    /**
     * 
     * @param paymentId
     * @return
     */
    MerchantPaymentDto queryDetailDto(String paymentId);
    /**
     *
     * @param paymentId
     * @return
     */
    MerchantPaymentDO queryDetail(String paymentId);

    /**
     * 
     * @param merchantPaymentDto
     */
    void updatePayment(MerchantPaymentDto merchantPaymentDto);
    /**
     *
     * @param merchantPaymentDO
     */
    void updatePayment(MerchantPaymentDO merchantPaymentDO);

    /**
     * 
     * @param merchantPaymentDto
     */
    void addPayment(MerchantPaymentDto merchantPaymentDto);

    /**
     * 
     * @param updateMerchantPaymentDetailDO
     */
    int updatePaymentDetail(MerchantPaymentDetailDO updateMerchantPaymentDetailDO);
    /**
     *
     * @param merchantPaymentDetailDO
     */
    void addPaymentDetail(MerchantPaymentDetailDO merchantPaymentDetailDO);

    /**
     * 
     * @param detailPaymentId
     * @return
     */
    MerchantPaymentDetailDO queryPaymentDetail(String detailPaymentId);

    /**
     * @param paymentId
     * @param paymentType
     */
    void updatePaymentStatus(String paymentId, MerchantEnum.PROCESS_STATUS paymentType);

    /**
     *
     * @param mchOrderNo
     * @return
     */
    MerchantPaymentDetailDO queryPaymentDetailByMchOrder(String mchOrderNo);

    /**
     *
     * @param merchantPaymentDtos
     */
    void addPaymentList(List<MerchantPaymentDto> merchantPaymentDtos);

    List<MerchantPaymentStatisticsDto> statistics(MerchantPaymentPageQueryDto merchantPaymentReq, String groupBy);
}
